package traitement.test;

import java.util.List;

import com.lo23.data.objgroup.Friend;
import com.lo23.data.objgroup.FriendshipAnswer;
import com.lo23.data.objinterface.LocalUser;

import TraitementMessages.FriendRequestResponseMessage;
import mainProcess.MainProcessing;
public class testFriendRequestResponseMessage {
	public testFriendRequestResponseMessage(String senderID, String senderLogin, boolean agree, MainProcessing mP) {
		FriendRequestResponseMessage message = new FriendRequestResponseMessage(senderID, senderLogin, agree);
		LocalUser lUser = mP.getDataInterface().getLocalUser(null);
		System.out.println("Liste d'amis avant handle reception");
		List<Friend> fList = lUser.getListFriends();
		for (Friend f : fList) {
			System.out.println(f.getLogin()+"  "+f.getuID());
		}
		message.handleReceiption(mP);
		System.out.println("Liste d'amis apres handle reception");
		List<Friend> fList1 = lUser.getListFriends();
		for (Friend f : fList1) {
			System.out.println(f.getLogin()+"  "+f.getuID());
		}
	}

}
